package array;

public class 训练计划1 {
    class Solution {
        public int[] trainingPlan(int[] nums) {
            int i=0,j= nums.length-1,tmp;
            while (i<j){
                while (i<j && (nums[i]&1)==1) i++;
                while (i<j && (nums[j]&1)==0) j--;
                tmp = nums[i];
                nums[i]= nums[j];
                nums[j] = tmp;
            }
            return nums;
        }
    }
}
